package top.luckyluxcis.mq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import top.luckyluxcis.vo.MessageVo;

import java.util.function.Consumer;

/**
 * @author Luxcis
 * @since 2022/8/8
 */
@Slf4j
@Component
public class TestConsumers {
    @Bean
    public Consumer<MessageVo> testConsumer1() {
        return message -> log.info("Consumer1接收数据:{},{}", message, System.currentTimeMillis());
    }

    @Bean
    public Consumer<MessageVo> testConsumer2() {
        return message -> log.info("Consumer2接收数据:{},{}", message, System.currentTimeMillis());
    }
}
